/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.uml_generator.model;

import java.util.List;

/**
 * interface representing an operation.
 */
public interface OperationModel
    extends AbstractObject
{

  /**
   * returns the body of the method.
   * 
   * @return the body of the method
   */
  public abstract String getBody();



  /**
   * set the body of the method.
   * 
   * @param body
   *          the body of the method
   */
  public abstract void setBody(String body);



  /**
   * returns the type of the returned value of the operation.
   * 
   * @return the type of the returned value of the operation
   */
  public abstract AttributeModel getReturnType();



  /**
   * set the type of the returned value of the operation.
   * 
   * @param returnType
   *          the type of the returned value of the operation
   */
  public abstract void setReturnType(final AttributeModel returnType);



  /**
   * returns the list of the parameters of this operation.
   * 
   * @return the list of the parameters of this operation
   */
  public abstract List<AttributeModel> getParameterModels();



  /**
   * add a new parameter to this operation.
   * 
   * @param parameterModel
   *          the parameter to add
   */
  public abstract void addParameterModels(AttributeModel parameterModel);



  /**
   * returns wether this method returns a value or not.
   * 
   * @return <code>true</code> if and only if this method does not return any
   *         value
   */
  public boolean hasVoidReturnType();



  /**
   * returns wether this method overrode an other function or not.
   * 
   * @return <code>true</code> if and only if this function override an other
   *         function
   */
  public boolean isOverride();



  /**
   * set wether this method overrode an other function or not.
   * 
   * @param override
   *          <code>true</code> if and only if this function override an other
   *          function
   */
  public void setOverride(boolean override);

}
